const path = require('path')
const resolve = dir => path.join(__dirname, dir)
const BASE_URL = process.env.NODE_ENV === 'procution' ? '/iview-admin/' : '/'
module.exports = {
  lintOnSave: false
}
module.exports = {
  // lintOnSave: true,
  baseUrl: BASE_URL,
  configureWebpack: config => {
    // 改个webpack devtool输出方式、默认那个我属实不知道怎么跟踪代码
    if (process.env.NODE_ENV === 'development') {
      config.devtool = 'source-map'
    }
  },
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_c', resolve('src/components'))
      .set('_conf', resolve('config'))
  },
  // 打包时不生成.map文件
  productionSourceMap: false,
  // 法规则检测
  lintOnSave: false,
  devServer: {
    proxy: 'http://127.0.0.1:8090/api/'
  }
}
